//
//  CopyTestObject.m
//  EncodeTest
//
//  Created by wangrui on 13-11-6.
//  Copyright (c) 2013年 PPS. All rights reserved.
//

#import "EncodeTestObject.h"

#define KEY @"codekey"

@implementation EncodeTestObject



- (id)initWithCoder:(NSCoder *)aDecoder{
    //id obj =  [aDecoder decodeObjectForKey:KEY];
    
    if ((self = [super init])) {
        int it = [aDecoder decodeIntegerForKey:@"integer"];
        self.tag = it;
    }
    
    NSLog(@"CopyTestObject decode");
    return self;

    //return obj;
}

- (void)encodeWithCoder:(NSCoder *)aCoder{
   
    //[aCoder encodeObject:self forKey:KEY];
    [aCoder encodeInteger:self.tag forKey:@"integer"];
    
    NSLog(@"CopyTestObject encode");
}


@end
